<?php
class Voucher_model extends BZ_Model
{
    protected $table = 'voucher';
    
    public function getVoucherByCode($code)
    {
        $this->db->where('code', $code);
        return $this->db->get($this->table);
    }

    public function updateVoucher($id, $data)
    {
        $this->db->where('id', $id);
        return $this->db->update($this->table,$data);
    }
}